home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wics.zip / FNTSEL.CPP < prev    next >
C/C++ Source or Header  |  1993-03-03  |  1KB  |  57 lines

  1. //=====================================================================================
  2. //    Windows Interface Contruction Set
  3. //    Version 1.00
  4. //
  5. //    FONTSEL.CPP - Font Selection Control Class
  6. //    Copyright ⌐ 1993 by Microdyne Development Technologies
  7. //    All rights reserved.
  8. //=====================================================================================
  9.  
  10. #include <fontsel.h>
  11. #include <wics.h>
  12.  
  13. TFontSelect::TFontSelect (PTWindowsObject AParent, int AnId, int X, int Y)
  14.     :     TControl(AParent, AnId, "", X, Y, 220, 24)
  15.  
  16. {
  17.     Attr.Style = WS_CHILD | WS_VISIBLE ;
  18. }
  19.  
  20. TFontSelect::~TFontSelect ()
  21. {
  22. }
  23.  
  24. void TFontSelect::GetFamilyName (WORD cchMax, LPSTR lpFamilyName)
  25. {
  26.     SendMessage (HWindow, FSM_GETFONTFAMILY, cchMax, (LPARAM) lpFamilyName);
  27. }
  28.  
  29. int TFontSelect::GetFontSize ()
  30. {
  31.     return (int) SendMessage(HWindow, FSM_GETFONTSIZE, 0, 0L);
  32. }
  33.  
  34. void TFontSelect::SetFamilyName (LPSTR lpFamilyName)
  35. {
  36.     SendMessage (HWindow, FSM_SETFONTFAMILY, 0, (LPARAM) lpFamilyName);
  37. }
  38.  
  39. void TFontSelect::SetFamilyCommandCode (WORD code)
  40. {
  41.     SendMessage (HWindow, FSM_SETFONTCOMMANDCODE, code, 0L);
  42. }
  43.  
  44. void TFontSelect::SetFontSize (int iPointSize)
  45. {
  46.     SendMessage (HWindow, FSM_SETFONTSIZE, iPointSize, 0L);
  47. }
  48.  
  49. void TFontSelect::SetFontSizeCommandCode (WORD code)
  50. {
  51.     SendMessage (HWindow, FSM_SETSIZECOMMANDCODE, code, 0L);
  52. }
  53.  
  54. void TFontSelect::WMDrawItem (RTMessage msg)
  55. {
  56.     DefWndProc(msg);
  57. }